<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>准备阶段--开工准备form</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
    <script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
</head>
<style>
    .windows {
        background-color: #f8f8f8;
    }
    .popUp {
        width: 90%;
    }
    .tableSelectBar>.layui-form input{
        display: none!important;
    }
    .tableSelectBar>.layui-form button{
        display: none!important;
    }
</style>

<body>
<div class="windows">
    <div class="popUp whitebg">
        <div class="popUpTitle ft24 bold">项目咨询规划书</div>
        <div class="clearfix mt10">
            <span class="fl">SDZZ-QR032</span>
<#--            <span class="fr">编号：JLRZ-${orderCode}</span>-->
        </div>
        <div class="popUpBox book">
            <form action="" class="layui-form addform">
                <div class="popUpBox">

                    <table>
                        <tr>
                            <td colspan="2">项目概述</td>
                        </tr>
                        <tr>
                            <td>项目名称</td>
                            <td>
                                <input type="hidden" name="spfPrjid" value="${spf_prjid}">
                                <input type="hidden" name="fileInd" value="${ind}">
                                <input type="hidden" name="spfStaid" value="${spf_staid}">
                                <input type="hidden" name="spfMilid" value="${spf_milid}">
                                <input type="hidden" name="projectName" value="${pdto.projectName}">
                                <input type="hidden" name="spfFilecode" value="${spfFilecode}">
                                <input type="hidden" name="bfcId" value="40021">
                                <input type="hidden" name="orderCode" value="${orderCode}">
                                <input type="hidden" name="fbCode" value="${fbCode}">
                                <input type="hidden" name="pcId" value="${pcId}">
                                <input type="hidden" name="wjNum" value="31">
                                <input type="hidden" name="spfF44" id="spfF44" value="${pdto.projectName}">
                                <input type="hidden" name="spfF45" id="spfF45" value="">
                                <input type="text" name="spfF1" id="spfF1" value="${pdto.projectName}"
                                       lay-verify="spfF1"
                                       style="width: 100%;">
                            </td>
                        </tr>
                        <tr>
                            <td>建设单位及负责人</td>
                            <td>
                                <textarea  name="spfF2" lay-verify="spfF2" onkeyup="javascript:setShowLength1(this,'xmfzr')">建设单位:${pdto.owerCompany}
                                    <#list listyz as vo>
                                            项目负责人:${vo.realName}
                                    </#list>
                                </textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xmfzr">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>项目背景</td>
                            <td>
                                <textarea type="text" name="spfF3" lay-verify="spfF3" onkeyup="javascript:setShowLength1(this,'xmbj')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xmbj">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>项目目标</td>
                            <td>
                                <textarea type="text" name="spfF4" lay-verify="spfF4" onkeyup="javascript:setShowLength1(this,'xmmb')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xmmb">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>建设内容、建设期及投资</td>
                            <td>
                                <textarea type="text" name="spfF5" lay-verify="spfF5" onkeyup="javascript:setShowLength1(this,'xsnrjs')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xsnrjs">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">服务概述</td>
                        </tr>
                        <tr>
                            <td>服务定位</td>
                            <td>
                                <textarea type="text" name="spfF6" lay-verify="spfF6" onkeyup="javascript:setShowLength1(this,'fwdw')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwdw">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>服务范围</td>
                            <td>
                                <textarea type="text" name="spfF7" lay-verify="spfF7" onkeyup="javascript:setShowLength1(this,'fwfw')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwfw">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>服务内容</td>
                            <td>
                                <textarea type="text" name="spfF8" lay-verify="spfF8" onkeyup="javascript:setShowLength1(this,'fwnr')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwnr">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>服务重点</td>
                            <td>
                                <textarea type="text" name="spfF9" lay-verify="spfF9" onkeyup="javascript:setShowLength1(this,'fwzd')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwzd">已输入0/5000</span>
                            </td>
                        </tr>
                        <tr>
                            <td>服务难点</td>
                            <td><textarea type="text" name="spfF10" lay-verify="spfF10" onkeyup="javascript:setShowLength1(this,'fwnd')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwnd">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>风险评估</td>
                            <td><textarea type="text" name="spfF11" lay-verify="spfF11" onkeyup="javascript:setShowLength1(this,'fxpg')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fxpg">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>服务分析</td>
                            <td><textarea type="text" name="spfF12" lay-verify="spfF12" onkeyup="javascript:setShowLength1(this,'fwfx')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwfx">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>服务依据</td>
                            <td><textarea type="text" name="spfF13" lay-verify="spfF13" onkeyup="javascript:setShowLength1(this,'fwyj')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwyj">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>交付成果</td>
                            <td><textarea type="text" name="spfF14" lay-verify="spfF14" onkeyup="javascript:setShowLength1(this,'jfcg')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="jfcg">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td colspan="2">实施方案</td>
                        </tr>
                        <tr>
                            <td>组织机构</td>
                            <td><textarea type="text" name="spfF15" lay-verify="spfF15" onkeyup="javascript:setShowLength1(this,'zzjg')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="zzjg">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>岗位职责</td>
                            <td><textarea type="text" name="spfF16" lay-verify="spfF16" onkeyup="javascript:setShowLength1(this,'gwzz')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="gwzz">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>能力要求</td>
                            <td><textarea type="text" name="spfF17" lay-verify="spfF17" onkeyup="javascript:setShowLength1(this,'nlyq')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="nlyq">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>人员考核</td>
                            <td><textarea type="text" name="spfF18" lay-verify="spfF18" onkeyup="javascript:setShowLength1(this,'rykh')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="rykh">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>总体进度计划</td>
                            <td><textarea type="text" name="spfF19" lay-verify="spfF19" onkeyup="javascript:setShowLength1(this,'ztjdjh')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="ztjdjh">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>需求调研输入</td>
                            <td><textarea type="text" name="spfF20" lay-verify="spfF20" onkeyup="javascript:setShowLength1(this,'xqdysr')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xqdysr">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>主要工作</td>
                            <td><textarea type="text" name="spfF21" lay-verify="spfF21" onkeyup="javascript:setShowLength1(this,'zygz')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="zygz">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>需求调研输出</td>
                            <td><textarea type="text" name="spfF22" lay-verify="spfF22" onkeyup="javascript:setShowLength1(this,'xqdysc')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xqdysc">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>工作流程</td>
                            <td><textarea type="text" name="spfF23" lay-verify="spfF23" onkeyup="javascript:setShowLength1(this,'gzlc')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="gzlc">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>方案设计</td>
                            <td><textarea type="text" name="spfF24" lay-verify="spfF24" onkeyup="javascript:setShowLength1(this,'fasj')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fasj">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>成果评审</td>
                            <td><textarea type="text" name="spfF25" lay-verify="spfF25" onkeyup="javascript:setShowLength1(this,'cgps')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="cgps">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>成果交付</td>
                            <td><textarea type="text" name="spfF26" lay-verify="spfF26" onkeyup="javascript:setShowLength1(this,'cgjf')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="cgjf">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>服务跟踪</td>
                            <td><textarea type="text" name="spfF27" lay-verify="spfF27" onkeyup="javascript:setShowLength1(this,'fwgz')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwgz">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>需求管理要求</td>
                            <td><textarea type="text" name="spfF28" lay-verify="spfF28" onkeyup="javascript:setShowLength1(this,'xqglyq')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xqglyq">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>关键指标</td>
                            <td><textarea type="text" name="spfF29" lay-verify="spfF29" onkeyup="javascript:setShowLength1(this,'gjzb')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="gjzb">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>支付管理</td>
                            <td><textarea type="text" name="spfF30" lay-verify="spfF30" onkeyup="javascript:setShowLength1(this,'zfgl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="zfgl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>知识管理</td>
                            <td><textarea type="text" name="spfF31" lay-verify="spfF31" onkeyup="javascript:setShowLength1(this,'zsgl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="zsgl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>客户关系管理</td>
                            <td><textarea type="text" name="spfF32" lay-verify="spfF32" onkeyup="javascript:setShowLength1(this,'khgxgl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="khgxgl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>信息安全管理</td>
                            <td><textarea type="text" name="spfF33" lay-verify="spfF33" onkeyup="javascript:setShowLength1(this,'xxaqgl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="xxaqgl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>风险管理</td>
                            <td><textarea type="text" name="spfF34" lay-verify="spfF34" onkeyup="javascript:setShowLength1(this,'fxgl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fxgl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>方法介绍</td>
                            <td><textarea type="text" name="spfF35" lay-verify="spfF35" onkeyup="javascript:setShowLength1(this,'ffjs')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="ffjs">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>方法应用</td>
                            <td><textarea type="text" name="spfF36" lay-verify="spfF36" onkeyup="javascript:setShowLength1(this,'ffyy')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="ffyy">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>方法培训</td>
                            <td><textarea type="text" name="spfF37" lay-verify="spfF37" onkeyup="javascript:setShowLength1(this,'ffpx')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="ffpx">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>办公场所</td>
                            <td><textarea type="text" name="spfF38" lay-verify="spfF38" onkeyup="javascript:setShowLength1(this,'bgcs')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="bgcs">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>计算机及办公辅助设备</td>
                            <td><textarea type="text" name="spfF39" lay-verify="spfF39" onkeyup="javascript:setShowLength1(this,'jsj')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="jsj">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>交通与通信</td>
                            <td><textarea type="text" name="spfF40" lay-verify="spfF40" onkeyup="javascript:setShowLength1(this,'jtytx')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="jtytx">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>服务测量、测试仪器与工具</td>
                            <td><textarea type="text" name="spfF41" lay-verify="spfF41" onkeyup="javascript:setShowLength1(this,'fwcl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwcl">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>服务质量保证计划</td>
                            <td><textarea type="text" name="spfF42" lay-verify="spfF42" onkeyup="javascript:setShowLength1(this,'fwzlbzjh')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="fwzlbzjh">已输入0/5000</span></td>
                        </tr>
                        <tr>
                            <td>咨询服务质量记录</td>
                            <td>
                                <textarea  name="spfF43" lay-verify="spfF43" onkeyup="javascript:setShowLength1(this,'zxfwzl')"></textarea>
                                <span class="abs limitfont"
                                      style="color: #ccc;float:left;margin-left: 3%;"
                                      id="zxfwzl">已输入0/5000</span>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="popUpBtn center">
                    <button type="button" class="blue bgnone close">关闭</button>
                    <button type="button" class="bluebg white" lay-submit lay-filter="submit">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/lay/modules/"
    })
</script>

<script>
    var layer;
    var form;
    var laydate;
    var tableSelect;
    var upload;
    var uploadListIns;
    var htlistJson = '${htlistJson}';
    var htList ;
    var htCount = 0;
    var htObjList = [];
    var formAct;
    layui.use(['form', 'laydate', 'layer', 'upload','tableSelect'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;
        upload = layui.upload;
        tableSelect = layui.tableSelect;
        // 日期
        laydate.render({
            elem: '#spfF45',
            value: new Date(),
            trigger: 'click',
            format: 'yyyy年MM月dd日'
        });
        // 表单校验
        $('form').initVerify(form);
        //监听提交
        //监听提交
        form.on('submit(submit)', function (data) {
            reNameList(data);
            layerAjax('/zx/projectManager/addFormFile', data.field, '', function (d) {
                if (d.flag == true) {
                    var spfId = d.data.spfId;// fmid
                    var fpid = d.data.fpid;// fpid
                    POBrowser.openWindowModeless('/zx/office/openword?ft=2&fmid=' + spfId + '&fpid=' + fpid, 'width=1200px;height=800px;', '{}')
                } else {
                    layer.msg(d.msg, {icon: 2});
                }
                console.log(d);
            });

            return false;

        });

        $('.close').click(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        form.render();
    });
    function addStr(object) {
        var _tb = $("#tabledata").find("tbody");
        var _tr = _tb.find("tr:last").clone();
        var _tr_cnt = _tb.find("tr").length + 1;
        _tr.find("td:eq(0) input:eq(0) ").val(_tr_cnt);
        _tb.append("  <tr>\n" +
            "                                 <td  style=\"width: 10%; border: 1px solid #CCCCCC;\" align=\"center\">\n" +
            "                                     <input type=\"text\" class=\"fdata\" style=\"text-align:center;\" value=\""+_tr_cnt+"\"\n" +
            "                                            name=\"formDataList[0].data1\" iname=\"data1\">\n" +
            "                                     <input type=\"hidden\" class=\"fdata\" name=\"formDataList[0].tableRow\"\n" +
            "                                            iname=\"tableRow\" value=\"5\">\n" +
            "                                     <input type=\"hidden\" class=\"fdata\" name=\"formDataList[0].tableCos\"\n" +
            "                                            iname=\"tableCos\" value=\"3\">\n" +
            "                                     <input type=\"hidden\" class=\"fdata\" name=\"formDataList[0].tableIndex\"\n" +
            "                                            iname=\"tableIndex\" value=\"1\">\n" +
            "                                 </td>\n" +
            "                                 <td  style=\"width: 40%;border: 1px solid #CCCCCC;\" align=\"center\">\n" +
            "                                     <input type=\"text\" class=\"fdata\" name=\"formDataList[0].data2\"\n" +
            "                                            iname=\"data2\">\n" +
            "                                 </td>\n" +
            "                                 <td  style=\"width: 40%;border: 1px solid #CCCCCC;\" align=\"center\">\n" +
            "                                     <input type=\"text\" class=\"fdata\" name=\"formDataList[0].data3\"\n" +
            "                                            iname=\"data3\">\n" +
            "                                 </td>\n" +
            "                                     <td style=\"width: 10%;border: 1px solid #CCCCCC;\" align=\"center\">\n" +
            "                                         <img src=\"${re.contextPath}/plugin/common/images/19@2x.png\"\n" +
            "                                              style=\"width: 22px;padding:10px \" onclick=\"deleteStr(this)\" alt=\"\">\n" +
            "                                     </td>\n" +
            "                                </tr>");
    }

    // 删除
    function deleteStr(object) {
        $(object).parent().parent().remove();
    }
    function reNameList(d) {
        $("#tabledata").find("tbody").find("tr").each(function (i, v) {
            var _v_tr = $(v);
            _v_tr.find(".fdata").each(function (j, w) {
                var _v_input = $(w);
                d.field["formDataList[" + i + "]." + _v_input.attr("iname")]=_v_input.val();
            })
        })
    }
    function setShowLength1(obj,id){
        debugger
        var val = obj.value;
        val = val.replace(/\s+/g,"");
        var remain = val.length;
        if(id == "xmfzr"){
            remain = remain - 28;
        }
        if(remain>5000){
            $("#"+id).html( "已输入"+remain+"/5000").css("color","#FF0000");
            $("#"+id).removeClass("text-gray-6");
        }else{
            $("#"+id).html( "已输入"+remain+"/5000").css("color","#ccc");
            $("#"+id).addClass("text-gray-6");
        }
    }
</script>
</body>
</html>
